#pragma once

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

class CSGD_Direct3D;
class CSGD_DirectInput;
class CSGD_TextureManager;
class CSGD_XAudio2;

class IGameState;
class MenuState;

class CGame
{
public:

	static CGame* GetInstance( void );

	void Initialize( HWND hWnd, HINSTANCE hInstance,
					 int nScreenWidth, int nScreenHeight,
					 bool bIsWindowed );

	bool Main( void );
	void Shutdown( void );

	void ChangeState( MenuState* pNewState );
	
	

	// Accessors
	int		GetScreenWidth	( void ) const	{	return m_nScreenWidth;	}
	int		GetScreenHeight	( void ) const	{	return m_nScreenHeight;	}
	bool	IsWindowed		( void ) const	{	return m_bIsWindowed;	}

private:
	CGame( void );
	CGame( const CGame& );
	CGame& operator=( const CGame& );
	~CGame( void );

	bool Input( void );
	void Update( void );
	void Render( void );


	// SGD Wrappers	
	CSGD_Direct3D*			m_pD3D;
	CSGD_DirectInput*		m_pDI;
	CSGD_TextureManager*	m_pTM;
	CSGD_XAudio2*			m_pXA;


	// Window Attributes
	int						m_nScreenWidth;
	int						m_nScreenHeight;
	bool					m_bIsWindowed;
	
	// Current Game State
	IGameState*				m_pCurrState;

	// Time
	DWORD					m_dwCurrTime;
};

